package com.ruoyi.system.exception;

import com.ruoyi.common.core.exception.BaseException;
import com.ruoyi.common.core.exception.domain.ExceptionMessage;
import com.ruoyi.system.constant.SystemConstants;


public class SystemException extends BaseException {

    public static final ExceptionMessage NOT_ALLOW_UPDATE = new ExceptionMessage(SystemConstants.moduleName, "not_allow_update", "不允许修改");
    public static final ExceptionMessage NOT_ALLOW_INSERT = new ExceptionMessage(SystemConstants.moduleName, "not_allow_insert", "不允许新增");
    public static final ExceptionMessage NOT_ALLOW_DELETE = new ExceptionMessage(SystemConstants.moduleName, "not_allow_delete", "不允许删除");
    public static final ExceptionMessage NOT_FOUND = new ExceptionMessage(SystemConstants.moduleName, "not_found", "未找到");
    public static final ExceptionMessage ACCOUNT_ALREADY_EXISTS = new ExceptionMessage(SystemConstants.moduleName, "account_already_exists", "账户已存在");
    public static final ExceptionMessage MOBILE_PHONE_ALREADY_EXISTS = new ExceptionMessage(SystemConstants.moduleName, "mobile_phone_already_exists", "手机号已存在");
    public static final ExceptionMessage EMAIL_PHONE_ALREADY_EXISTS = new ExceptionMessage(SystemConstants.moduleName, "email_phone_already_exists", "邮箱已存在");


    public SystemException(String code, String defaultMessage) {
        super(SystemConstants.moduleName, code, null, defaultMessage);
    }

    public SystemException(ExceptionMessage exceptionMessage) {
        super(exceptionMessage);
    }
}
